public
class Main implements Runnable
{
	int delay;
	String word;
	public Main(String word, int delay)
	{
		this.delay = delay;
		this.word = word;
	}
	public void run()
	{
		for(int i = 0; i < 5; i++){
			System.out.println(word + " " + i);
			try{
				Thread.sleep(delay);
			}
			catch(InterruptedException e){
			}
		}
	}
	public static void main(String args[])
	{
		Runnable thread1 = new Main("thread1", 3);
		Runnable thread2 = new Main("thread2", 1);
		new Thread(thread1).start();
		new Thread(thread2).start();
	}
}
